<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class ProductAddAssetField extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::table('products', function (Blueprint $table) {
            $table->string('issuer', 32)->default('')->comment('发行机构');
            $table->string('asset_image_url', 256)->nullable()->comment('资产图片');
            $table->string('hold_rights', 256)->default('')->comment('许可权利类型');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::table('products', function (Blueprint $table) {
            $table->dropColumn(['issuer', 'asset_image_url', 'hold_rights']);
        });
    }
}
